import React from './core/React.js'

// useState

function Foo() {
  console.log('re foo');
  const [count, setCount] = React.useState(10)
  const [bar, setBar] = React.useState('abcd')
  function handleClick() {
    // setCount((c) => c + 1)
    // setBar((s) => s + 'abc')
    setBar(() => 'abc1d')
  }

  return (
    <div>
      <h1>foo</h1>
      {bar}
      <button onClick={handleClick}>click</button>
    </div>
  )
}

function App() {
  return (
    <div>
      hi-mini-react
      <Foo></Foo>
    </div>
  )
}

export default App
